<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@include file="/WEB-INF/base.jspf"%>
<!DOCTYPE html>
<html>
<head>
<title>轮播图片管理</title>
<style>
	.div-c-controlBtns {
		display:flex;
		justify-content:flex-end;
		margin-bottom:16px;
	}
		.modal-dialog {
		max-width: 1000px;
	}
	.div-c-controlBtns button + button {
		margin-left:8px;
	}
	.p-c-flexwrapper {
		display:flex;
		align-items:center;
		margin-right:16px;
		margin-bottom:16px;
	}
	.p-c-flexwrapper > span {
		width:112px;
	}
	.p-c-flexwrapper > .form-control {
		width:180px;
	}
	#addAndEditModal .modal-body {
		display:flex;
		flex-wrap:wrap;
	}
	.bootstrap-background {
	    color: #fff;
	    display: inline-block;
	    text-align: center;
	    white-space: nowrap;
	    vertical-align: middle;
	    border: 1px solid transparent;
	    padding: 5px 10px;
	    line-height: 1.5;
	    border-radius: 3px;
	    font-size: 12px;
	    cursor: default;	
	}
	.bootstrap-background.info {
		 background-color: #5bc0de;
   		 border-color: #46b8da;
	}
	.bootstrap-background.success {
		background-color: #5cb85c;
	    border-color: #4cae4c;
	}
	.bootstrap-background.all {
		background-color: rgb(65,139,202);
	    border-color: rgb(65,139,202);
	}	
	.img-c-smallPic {
		max-width:60px;
		max-height:60px;
		cursor: pointer;
	}		
	.pic-noticeText {
		display:none;
		margin: 0 16px;
	}
	.pic-noticeText.active {
		display:block;
	}
	.btn-del-prevPhoto {
		cursor: pointer;
		text-decoration: underline;
		color:#5188b9;
	}
</style>
</head>
<body>
<!-- <div class="switch" data-on-label="SI" data-off-label="NO"> -->
<!-- </div> -->
	<div class="div-c-controlBtns" style="display:flex;justify-content:flex-start;">
		<button class="btn btn-success" id="button-i-addNewZongDaiLi">刷新</button>
	</div>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">充值未处理</li>
    <li>提款未处理</li>
  </ul>
  <div class="layui-tab-content">
  	<div class="layui-tab-item layui-show">
	 	<table id="table-i-chongzhiList" class="undealList-table table table-striped table-bordered table-hover">
			<thead>
				<tr>
					<th style="display:none;"></th>
					<th>操作</th>
					<th>会员名</th>
					<th>付款金额(/元)</th>
					<th>申请时间</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>	 	
  	</div>
  	<div class="layui-tab-item">
	 	<table id="table-i-tikuanList" class="undealList-table table table-striped table-bordered table-hover">
			<thead>
				<tr>
					<th style="display:none;"></th>
					<th>操作</th>
					<th>会员账号</th>
					<th>提款金额</th>
					<th>申请时间</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>  	
  	</div>
  </div>
</div>      	
	
	<script type="text/javascript" src="<%=basePath %>js/zhengzeTools.js"></script>
	<script>
	$("#button-i-addNewZongDaiLi").on("click", function(e) {
		$("#table-i-chongzhiList").DataTable().ajax.reload()
		$("#table-i-tikuanList").DataTable().ajax.reload()
	})
	$("#table-i-chongzhiList").DataTable({
	      // "bPaginate": true,
	      "bLengthChange": true,      
	      "bSort": false,
	      // "bInfo": true,
	      "bAutoWidth": false,
//		         "bServerSide":true,
	      'aLengthMenu':[20, 30],
	       "searching": false,
	       "dom": "ftp",
//		    "searching": true,l
	       "language": {//语言设置  
	            "lengthMenu": "每页显示 _MENU_ 条记录",     
	            "zeroRecords": "没有检索到数据",     
	            "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",     
	            "info": "没有数据",     
	            "oPaginate": {     
	                "sFirst": "首页",     
	                "sPrevious": "前一页",     
	                "sNext": "后一页",     
	                "sLast": "尾页"    
	          	},
	            "search":"搜索:",
	            "infoFiltered":   "(从  _MAX_ 记录中搜索出结果)",
	            "infoEmpty":      "没有找到匹配的信息",
	         },
	         "ajax": {
	        	 "type": "POST",
	        	 "url": "/zhgl/chognzhits.do",
	        	 "dataSrc": function(json) {
	        		 var arr = []
	        		 for (var i = 0; i < json.data.length; i++) {
	        			 var item = json.data[i]
	        			 if (item.tikuanje === 0) {
	        				 arr.push(item)
	        			 }
	        		 }
	        		 return arr
	        	 }
	         },
	         "columns": [
						 {"data": "id", "className": "hidden-td id-edit-td"},
	                     {"data": null, "defaultContent": "<button data-type='chongzhi' class='btn btn-warning btn-c-dealBtn btn-sm'>前往操作</button>"},
	                     {"data": "name", "className": "name-edit-td" },
	                     {"data": "fukuanje", "className": "skname-edit-td" },
	                     {"data": "sqtime", "className": "sqtime-edit-td" },
	                 ],
	            
	   		 })		
	
	$("#table-i-tikuanList").DataTable({
	      // "bPaginate": true,
	      "bLengthChange": true,      
	      "bSort": false,
	      // "bInfo": true,
	      "bAutoWidth": false,
//		         "bServerSide":true,
	      'aLengthMenu':[20, 30],
	       "searching": false,
	       "dom": "ftp",
//		    "searching": true,l
	       "language": {//语言设置  
	            "lengthMenu": "每页显示 _MENU_ 条记录",     
	            "zeroRecords": "没有检索到数据",     
	            "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",     
	            "info": "没有数据",     
	            "oPaginate": {     
	                "sFirst": "首页",     
	                "sPrevious": "前一页",     
	                "sNext": "后一页",     
	                "sLast": "尾页"    
	          	},
	            "search":"搜索:",
	            "infoFiltered":   "(从  _MAX_ 记录中搜索出结果)",
	            "infoEmpty":      "没有找到匹配的信息",
	         },
	         "ajax": {
	        	 "type": "POST",
	        	 "url":"/zhgl/chognzhits.do",
	        	 "dataSrc": function(json) {
	        		 var arr2 = []
	        		 for (var z = 0; z < json.data.length; z++) {
	        			 var item = json.data[z]
	        			 if (item.fukuanje === 0) {
	        				 arr2.push(item)
	        			 }
	        		 }
	        		 return arr2
	        	 }  	 
	         },
 	         "columns": [
						 {"data": "id", "className": "hidden-td id-edit-td"},
	                     {"data": null, "defaultContent": "<button data-type='tikuan' class='btn btn-warning btn-c-dealBtn btn-sm'>前往操作</button>"},
	                     {"data": "name", "className": "name-edit-td" },
	                     {"data": "tikuanje", "className": "skname-edit-td" },
	                     {"data": "sqtime", "className": "sqtime-edit-td" },
	                 ]       
	   		 })		 
	   		 var TYPE_OBJ = {
					"tikuan": "/zhgl/tikuanjljsp.do",
					"chongzhi":"/zhgl/chongzhijsp.do",
				}
			$(".undealList-table").on("click", ".btn-c-dealBtn", function(e) {
				var btn = window.parent.document.querySelector("#btn-i-deal-" + e.currentTarget.dataset.type)
				var currentThis = window.parent.document.querySelector(".layui-this")
				currentThis.classList.remove("layui-this")
				$(btn).parent().addClass("layui-this")
				$(btn).closest("li").addClass("layui-nav-itemed")
				window.parent.document.querySelector("#testFrame").src = TYPE_OBJ[e.currentTarget.dataset.type]
			})
	</script>
</body>
</html>